﻿<style>
    #tab.table > thead > tr > th, #tab.table > tbody > tr > th, #tab.table > tfoot > tr > th, #tab.table > thead > tr > td, #tab.table > tbody > tr > td, #tab.table > tfoot > tr > td {
        vertical-align: middle;
        text-align: center;
    }

    .default-tab input, .default-tab select {
        border: none;
        box-shadow: none !important;
    }

    a .iconfont {
        margin-right: 5px;
        font-size: 12px;
    }
</style>
<div class="form-horizontal" ms-controller="JHBG">

    <div style="margin: 0 80px;">
        <div>
            <ul class="clearfix" style="display: block; padding: 0">
                <li class="add-item add-width fl-left">
                    <label class="add-item-label">计划名称</label>
                    <div class="add-ic">
                        <input type="text" ms-duplex="jhdata.JHTitle" maxlength="400" class="form-control htlb" disabled="disabled" />
                    </div>
                </li>


                <li class="add-item add-width fl-right">
                    <label class="add-item-label">所在单位</label>
                    <div class="add-ic">
                        <input type="text" ms-duplex="jhmxdata.dwname" maxlength="400" class="form-control htlb" disabled="disabled" />
                    </div>
                </li>


                <li class="add-item add-width fl-left">
                    <label class="add-item-label">计划属性</label>
                    <div class="add-ic">
                        <input type="text" ms-duplex="jhmxdata.FLName" maxlength="400" class="form-control htlb" disabled="disabled" />
                    </div>
                </li>
                <li class="add-item add-width fl-right">
                    <label class="add-item-label">项目期别</label>
                    <div class="add-ic">
                        <input type="text" ms-attr-value="jhmxdata.Remark1+jhmxdata.Remark2" maxlength="400" class="form-control htlb" disabled="disabled" />
                    </div>

                </li>


                <li class="add-item add-width fl-left">
                    <label class="add-item-label">对方单位</label>
                    <div class="add-ic">
                        <input type="text" ms-duplex="jhmxdata.dfdw" class="form-control " disabled="disabled" />

                    </div>

                </li>
                <li class="add-item add-width fl-right">
                    <label class="add-item-label">计划金额（元）</label>
                    <div class="add-ic">
                        <input type="text" ms-duplex="jhmxdata.je1" maxlength="400" class="form-control htlb" disabled="disabled" />
                    </div>
                </li>
                <li class="add-item  add-widthall">
                    <label class="add-item-label">变更金额（元）</label>
                    <div class="add-ic">
                        <input type="text" ms-duplex="modelData.BGJE" maxlength="400" class="form-control htlb" />
                    </div>

                </li>
                <li class="add-item  add-widthall">
                    <label class="add-item-label">变更理由</label>
                    <div class="add-ic">
                        <input type="text" ms-duplex="modelData.BGLY" maxlength="400" class="form-control htlb" />
                    </div>

                </li>
            </ul>
        </div>

    </div>


</div>
<script>
    var tempmodel = avalon.define({
        $id: "JHBG",
        name: "支出明细",
        modelData: { "BGJE": "", "BGLY": "", "JHMXID": "", "ID": "0", "intProcessStanceid": "0" },
        jhmxdata: {},
        jhdata: {},
        inittemp: function (strId) {
            tempmodel.modelData.JHMXID = ComFunJS.getQueryString("MXID", "0");
            $.getJSON('/API/VIEWAPI.ashx?Action=JHBG_GETMXINITDATA', { P1: ComFunJS.getQueryString("MXID", "0") }, function (resultData) {
                if (resultData.ErrorMsg == "") {
                    tempmodel.jhmxdata = resultData.Result;
                    tempmodel.jhdata = resultData.Result1[0];
                    if (strId) {
                        //编辑加载数据
                        $.getJSON('/API/VIEWAPI.ashx?Action=JHBG_GETMODEL', { P1: strId }, function (result) {
                            if (result.ErrorMsg == "") {
                                tempmodel.modelData = result.Result;
                                setTimeout(" ComFunJS.initForm()", 500)
                            }
                        })
                    } else {
                        ComFunJS.initForm()
                    }
                }
            })



        },//初始化
        SaveData: function (callback) {
            $.post("/API/VIEWAPI.ashx?ACTION=JHBG_ADDJHBG", { P1: JSON.stringify(tempmodel.modelData.$model) }, function (result) {
                return callback.call(this, result);
            });
        },
        WFComplate: function () {
            $.post("/API/VIEWAPI.ashx?ACTION=JHBG_COM", { P1: tempmodel.modelData.ID }, function (result) {

            });
        }
    });//# sourceURL=JHBG.js;
</script>
